package org.rcy.ruicingmarket.comment;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.Date;

/**
 * @author RuicyWu
 * @Date 2022/3/25 9:56
 */
@Data
@Document("comment")
@AllArgsConstructor
@NoArgsConstructor
public class Comment implements Serializable {
    @Id
    private String id; //id
    @Indexed
    private String index;//雪花生成器生成评论标识，mongoDB建立索引
    private String content;//内容
    @Indexed
    private String skuId;//图书id
    private Date updatetime;//发布日期
    private String uid;//用户id
    private Integer thumbup;//点赞量
    private String parentid; //上级id
    private String respondent;//被回复者
}
